//
//  BaseViewController.m
//  Connections
//
//  Created by beisheng03 on 2017/9/28.
//  Copyright © 2017年 beisheng. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (UITableView *)plainTableView{
    
    if (_plainTableView == nil) {

        UITableView *temp = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, KScreenW, KScreenH) style:UITableViewStylePlain];
        
        temp.delegate = self;
        temp.dataSource = self;
        
        temp.showsVerticalScrollIndicator = NO;
        temp.showsHorizontalScrollIndicator = NO;
        
        _plainTableView = temp;
        
        [self.view addSubview:temp];
        
    }
    
    return _plainTableView;
    
    
}


- (UITableView *)groupTableView{
    
    if (_groupTableView == nil) {
        
        UITableView *temp = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, KScreenW, KScreenH) style:UITableViewStyleGrouped];
        
        temp.delegate = self;
        temp.dataSource = self;
        
        temp.showsVerticalScrollIndicator = NO;
        temp.showsHorizontalScrollIndicator = NO;
        
        _groupTableView = temp;
        
        
        [self.view addSubview:temp];
        
        
    }
    
    return  _groupTableView;
    
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = randomColor;
    
    if (@available(iOS 11.0, *)) {
        
        //        self.groupTableView.contentInsetAdjustmentBehavior = UIApplicationBackgroundFetchIntervalNever;
        
    }
    // Do any additional setup after loading the view.
}


- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    
    [self.navigationController setNavigationBarHidden:NO animated:YES];
    
  
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    

}



- (UIStatusBarStyle)preferredStatusBarStyle{
    
    return UIStatusBarStyleLightContent;
    
}

#pragma mark - tableviewDelegate

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    
    return 0;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 0;
    
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    
    return [[UITableViewCell alloc]init];
    
    
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    NSLog(@"------");
    
}


/*
 
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
 
*/

@end
